//接口文件
import {
  request
} from './http';
import {
  URL,
  METHOD
} from './api';

export default {
  install(Vue){
    Vue.prototype.$API = this
  },
  banner_list(){
    return request(METHOD.GET, URL.shop.banner)
  },
  bargain_list(){
    return request(METHOD.GET, URL.bargain.list)
  },
  bargain_info(kjid,joiner){
    return request(METHOD.POST, URL.bargain.info,{params:{kjid,joiner}})
  },
  shop_list(){
    return request(METHOD.GET, URL.shop.list)
  },
  shop_category(){
    return request(METHOD.GET, URL.shop.category)
  },
  shop_detail(id){
    return request(METHOD.GET, URL.shop.detail,{params:{id}})
  },
  subject_detail(id){
    return request(METHOD.GET , URL.subject.detail,{params:{id}})
  },
  subject_list(){
    return request(METHOD.GET , URL.subject.list)
  },
  user_login(mobile,pwd){
    return request(METHOD.GET , URL.user.login,{params:{mobile,pwd}})
  },
}